<template>
	<view>
		<view :class="classname">{{name}}</view>
		<button @tap="alert('哈哈哈')" type="default">修改</button>
		<button @tap="changeStyle()" type="default">修改样式</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				classname:'box',
				name:'我是大笨蛋'
			}
		},
		methods: {
			alert(name){
				this.name = "www" + name;
			},
			changeStyle(){
				this.classname = 'aa';
			}
		}
	}
</script>

<style>
	.box{
		color: pink;
	}
	.aa{
		color: red;
	}

</style>
